Carrier-sense multiple access with collision detection ( CSMA/CD) is a medium access control (MAC) method used most notably in early Ethernet technology for local area networking. It uses Carrier signal-sensing to defer transmissions until no other stations are transmitting. This is used in combination with collision detection, in which a transmitting station detects collisions by sensing transmissions from other stations while it is transmitting a frame. When this collision condition is detected, the station stops transmitting that frame, transmits a jam signal, and then waits for a random time interval before trying to resend the frame.
CSMA/CD is a modification of pure carrier-sense multiple access (CSMA). CSMA/CD is used to improve CSMA performance by terminating transmission as soon as a collision is detected, thus shortening the time required before a retry can be attempted.
With the growing popularity of in the 1990s, full duplex point-to-point operation became standard in FastEthernet and GigabitEthernet. Collisions don’t occur in such networks. Also, IEEE 802.3 deprecated Ethernet repeaters in 2011 in favor of Ethernet switches, making CSMA/CD and half-duplex operation less common and less important.IEEE 802.3-2012 Clauses 9, 27, 41
The following procedure is used to resolve a detected collision. The procedure is complete when retransmission is initiated or the retransmission is aborted due to numerous collisions.
Methods for collision detection are media dependent. On a shared, electrical bus such as 10BASE5 or 10BASE2, collisions can be detected by comparing transmitted data with received data or by recognizing a higher than normal signal amplitude on the bus.IEEE 802.3 8.3.1.5 Collision detect thresholdsIEEE 802.3 10.4.1.5 Collision detect thresholds On all other media, a carrier sensed on the receive channel while transmitting triggers a collision event.IEEE 802.3 14.2.1.4 Collision Presence function requirements (half duplex mode only) Repeaters or Ethernet hub detect collisions on their own and propagate jam signals.IEEE 802.3 9.5.6 Collision handlingIEEE 802.3 27.3.1.4 Collision handling functional requirements
The collision recovery procedure can be likened to what happens at a dinner party, where all the guests talk to each other through a common medium (the air). Before speaking, each guest politely waits for the current speaker to finish. If two guests start speaking at the same time, both stop and wait for short, random periods of time (in Ethernet, this time is measured in microseconds). The hope is that by each choosing a random period of time, both guests will not choose the same time to try to speak again, thus avoiding another collision.
The maximum jam-time is calculated as follows: The maximum allowed diameter of an Ethernet installation is limited to 232 bits. This makes a round-trip time of 464 bits. As the slot time in Ethernet is 512 bits, the difference between slot time and round-trip-time is 48 bits (6 bytes), which is the maximum jam-time.
This in turn means: A station noting a collision has occurred is sending a 4- to 6-byte-long pattern composed of 16 1-0 bit combinations.The size of this jam signal is clearly above the minimum allowed frame-size of 64 bytes.
The purpose of this is to ensure that any other node that may currently be receiving a frame will receive the jam signal in place of the correct 32-bit MAC CRC; this causes the other receivers to discard the frame due to a CRC error.
As a correctly set up CSMA/CD network link should not have late collisions, the usual possible causes are full-duplex/half-duplex mismatch, exceeded Ethernet cable length limits, or defective hardware such as incorrect cabling, non-compliant number of hubs in the network, or a bad NIC.
On UTP cable, a local collision is detected on the local segment only when a station detects a signal on the RX pair at the same time it is sending on the TX pair. Since the two signals are on different pairs, there is no characteristic change in the signal. Collisions are only recognized on UTP when the station is operating in half-duplex. The only functional difference between half and full-duplex operation in this regard is whether or not the transmit and receive pairs are permitted to be used simultaneously.
For example, user A and user B both try to access a quiet link at the same time. Since they detect a collision, user A waits for a random time between 0 and 1 time units and so does user B. Let's say user A chooses a lower back-off time. User A then begins to use the link and B allows it to finish sending its data frame. If user A still has more to send, then user A and user B will cause another data collision. A will once again choose a random back-off time between 0 and 1, but user B will choose a back-off time between 0 and 3 – because this is B's second time colliding in a row. Chances are A will "win" this one again. If this continues, A will most likely win all the collision battles, and after 16 collisions (the number of tries before a user backs down for an extended period of time), user A will have "captured" the channel.
The ability of one node to capture the entire medium is decreased as the number of nodes increases. This is because, as the number of nodes increases, there is a higher probability that one of the "other" nodes will have a lower back-off time than the capturing node.
The channel capture effect creates a situation where one station is able to transmit while others are continually backing off, thus leading to a situation of short-term unfairness. Yet, the situation is long-term fair because every station has the opportunity to "capture" the medium once one station is done transmitting. The efficiency of the channel is increased when one node captures the channel.
A negative side effect of the capture effect would be the idle time created due to stations backing off. Once one station is finished transmitting on the medium, large idle times are present because all other stations were continually backing off. In some instances, back-off can occur for so long that some stations actually discard packets because maximum attempt limits have been reached.
|
|